package com.kexuexiong.demo.bear.mq.consumer;

import com.kexuexiong.demo.bear.mq.RocketMessage;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RocketMQMessageListener(topic = "rocket_msg", consumerGroup = "rocket_msg_01")
public class RocketMsgConsumer implements RocketMQListener<RocketMessage> {
    @Override
    public void onMessage(RocketMessage message) {
        log.info("rocket_msg:{}", message);
    }
}
